<?PHP 
function yuyueStatus($status = ''){
    $array  =   array('','<font class="text-success">新预约</font>','<font class="text-info">已出发</font>','已完成','已取消');
    if( $status !== '' ){
        return $array[$status];
    }else{
        return $array;
    }
}
/**
 * 获取无限极分类
 */
function getTypes() {
	$ticketType = D ( 'TicketType' );
	$ticketTypeArray = $ticketType->field ( 'id,name,bid,bids' )->where ( ' ishidden = 0 ' )->order ( ' bids ASC ' )->select ();
	return $ticketTypeArray;
}

function get_angel($type_id,$type){
    if($type==1){
        //商品
        $rs=M('shop')->find($type_id);
        if($rs){
            $name='商品ID:'.$type_id.'&nbsp;'.$rs['title'];
        }else{
            $name='ID:'.$type_id.'商品不存在';
        }

    }
    if($type==2){
        //店铺
        $rs=M('store')->find($type_id);
        if($rs){
            $name='店铺ID:'.$type_id.'&nbsp;'.$rs['title'];
        }else{
            $name='ID:'.$type_id.'店铺不存在';
        }

    }
    if($type==3){
        //分类
        $rs=M('ticket_type')->find($type_id);
        if($rs){
            $name='分类ID:'.$type_id.'&nbsp;'.$rs['name'];
        }else{
            $name='ID:'.$type_id.'分类不存在';
        }

    }
    return $name;
}
   
   function tj_count_user($id){
   	$count=M('users')->where('tj_userid='.$id)->count();
   	return $count;
   }
?>